home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Patches.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  3.7 KB  |  148 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Patches.a
  3. ;
  4. ;    Contains:    Patch Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.  
  19.     IF &TYPE('__PATCHES__') = 'UNDEFINED' THEN
  20. __PATCHES__ SET 1
  21.  
  22.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  23.     include 'Types.a'
  24.     ENDIF
  25.  
  26.     IF TARGET_OS_MAC THEN
  27.  
  28. kOSTrapType                        EQU        0
  29. kToolboxTrapType                EQU        1
  30. ; typedef SignedByte                     TrapType
  31.  
  32.  
  33. OSTrap                            EQU        0                    ; old name 
  34. ToolTrap                        EQU        1                    ; old name 
  35. ;    GetTrapAddress and SetTrapAddress are obsolete and should not
  36. ;    be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  37. ;    The old routines will not be supported for PowerPC apps.
  38. ;
  39.  
  40.     IF ¬ TARGET_RT_MAC_CFM THEN
  41. ;
  42. ; pascal UniversalProcPtr GetTrapAddress(UInt16 trapNum)
  43. ;
  44.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  45.         _GetTrapAddress:    OPWORD    $A146
  46.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  47.         IMPORT_CFM_FUNCTION GetTrapAddress
  48.     ENDIF
  49.  
  50. ;
  51. ; pascal void SetTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  52. ;
  53.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  54.         _SetTrapAddress:    OPWORD    $A047
  55.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  56.         IMPORT_CFM_FUNCTION SetTrapAddress
  57.     ENDIF
  58.  
  59.     ENDIF
  60. ;
  61. ; pascal UniversalProcPtr GetOSTrapAddress(UInt16 trapNum)
  62. ;
  63.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  64.         ; parameters:
  65.         ;    trapNum         => D0
  66.         ; returns:
  67.         ;    UniversalProcPtr <= A0
  68.         _GetOSTrapAddress:    OPWORD    $A346
  69.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  70.         IMPORT_CFM_FUNCTION GetOSTrapAddress
  71.     ENDIF
  72.  
  73. ;
  74. ; pascal void SetOSTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  75. ;
  76.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  77.         ; parameters:
  78.         ;    trapAddr        => A0
  79.         ;    trapNum         => D0
  80.         _SetOSTrapAddress:    OPWORD    $A247
  81.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  82.         IMPORT_CFM_FUNCTION SetOSTrapAddress
  83.     ENDIF
  84.  
  85. ;
  86. ; pascal UniversalProcPtr GetToolTrapAddress(UInt16 trapNum)
  87. ;
  88.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  89.         ; parameters:
  90.         ;    trapNum         => D0
  91.         ; returns:
  92.         ;    UniversalProcPtr <= A0
  93.         _GetToolTrapAddress:    OPWORD    $A746
  94.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  95.         IMPORT_CFM_FUNCTION GetToolTrapAddress
  96.     ENDIF
  97.  
  98. ;
  99. ; pascal void SetToolTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  100. ;
  101.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  102.         ; parameters:
  103.         ;    trapAddr        => A0
  104.         ;    trapNum         => D0
  105.         _SetToolTrapAddress:    OPWORD    $A647
  106.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  107.         IMPORT_CFM_FUNCTION SetToolTrapAddress
  108.     ENDIF
  109.  
  110. ;
  111. ; pascal UniversalProcPtr GetToolboxTrapAddress(UInt16 trapNum)
  112. ;
  113.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  114.         ; parameters:
  115.         ;    trapNum         => D0
  116.         ; returns:
  117.         ;    UniversalProcPtr <= A0
  118.         _GetToolboxTrapAddress:    OPWORD    $A746
  119.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  120.         IMPORT_CFM_FUNCTION GetToolboxTrapAddress
  121.     ENDIF
  122.  
  123. ;
  124. ; pascal void SetToolboxTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  125. ;
  126.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  127.         ; parameters:
  128.         ;    trapAddr        => A0
  129.         ;    trapNum         => D0
  130.         _SetToolboxTrapAddress:    OPWORD    $A647
  131.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  132.         IMPORT_CFM_FUNCTION SetToolboxTrapAddress
  133.     ENDIF
  134.  
  135.     IF TARGET_CPU_PPC THEN
  136. ;
  137. ; pascal UniversalProcHandle GetTrapVector(UInt16 trapNumber)
  138. ;
  139.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  140.         IMPORT_CFM_FUNCTION GetTrapVector
  141.     ENDIF
  142.  
  143.     ENDIF    ; TARGET_CPU_PPC
  144.     ENDIF    ; TARGET_OS_MAC
  145.     ENDIF ; __PATCHES__ 
  146.  
  147.